package org.zsl.ioc.app.z.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.zsl.ioc.app.z.dao.RoleDAO;
import org.zsl.ioc.app.z.model.Role;


/**
 *  业务逻辑
 *
 * @Component("roleService")
 * */
@Service
public class RoleService {


    /**
     *    <bean id="roleService" class="RoleService" autowire="byType"></bean>
     * */
    @Autowired
    private RoleDAO roleDAO;

    public Boolean addRole(Role role){
        return  roleDAO.insert(role);
    }

}
